#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

typedef int BTDataType;

typedef struct BinaryTreeNode
{
	BTDataType data;
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
}BTNode;

BTNode* BuyNode(BTDataType x);

BTNode* CreateBT();

void PrevOrder(BTNode* root);

void InOrder(BTNode* root);

void PostOrder(BTNode* root);

int BTSize(BTNode* root);

int BTLeafSize(BTNode* root);

int BTHeight(BTNode* root);

int BTLevelKSize(BTNode* root,int k);

BTNode* BTFind(BTNode* root,BTDataType x);

void BTDestroy(BTNode* root);

void BTLevelOrder(BTNode* root);

bool IsCompleteBT(BTNode* root);
